<!-- 用户编辑模态框 -->
<div class="modal-body">
    <form class="form-horizontal" method="post" name="form_submit" id="form_submit"
          action="${request.contextPath}/soa/baseinfo/train/datas/save">
        <input type="hidden" id="id" name="id" value="${model.id!}">
        <div class="box-body">
            <div class="form-group">
                <label for="title" class="col-sm-3 control-label">标题</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="title" name="title" placeholder="请输入"
                           value="${model.title!}">
                </div>
            </div>
            <div class="form-group">
                <label for="trainDesc" class="col-sm-3 control-label">培训介绍</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="trainDesc" name="trainDesc" placeholder="请输入"
                           value="${model.trainDesc!}">
                </div>
            </div>
            <div class="form-group">
                <label for="beginTime" class="col-sm-3 control-label">培训时间</label>
                <div class="col-sm-8 input-group">
                    <input style="margin-left: 15px !important;" type="text" class="form_datetime form-control" id="beginTime" name="beginTime" placeholder="请输入"
                           value="${model.beginTime!}">
                    <div class="input-group-addon">
                        <span class="glyphicon glyphicon-th" style="margin-left: 15px !important;"></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="trainPosition" class="col-sm-3 control-label">培训地点</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="trainPosition" name="trainPosition" placeholder="请输入"
                           value="${model.trainPosition!}">
                </div>
            </div>
            <div class="form-group">
                <label for="notify" class="col-sm-3 control-label">通知状态</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" id="notify" name="notify" placeholder="请输入"
                           value="${model.notify!}">
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    //表单校验及提交事件
    $('#form_submit').bootstrapValidator({
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            title: {
                message: 'this is not valid',
                validators: {
                    notEmpty: {
                        message: '不能为空！'
                    }
                }
            }
            , trainDesc: {
                message: 'this is not valid',
                validators: {
                    notEmpty: {
                        message: '不能为空！'
                    }
                }
            }
            , beginTime: {
                message: 'this is not valid',
                validators: {
                    notEmpty: {
                        message: '不能为空！'
                    }
                }
            }
            , trainPosition: {
                message: 'this is not valid',
                validators: {
                    notEmpty: {
                        message: '不能为空！'
                    }
                }
            }
        }
    });
    $(document).ready(function () {
        //加载时间控件
        $('.form_datetime').datepicker({
            language: 'zh-CN',
            format: 'yyyy-mm-dd',
            weekStart: 1,
            autoclose: true,
            forceParse: false
        });

    });
</script>
